package com.mtz.exception;

import com.mtz.enums.ResultEnum;
import lombok.Getter;

/**
 * @author 煜赜
 * @date 2018/11/27 0027 上午 9:38
 */
@Getter
public class MtzException extends RuntimeException {
    private Integer code;

    public MtzException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());

        this.code = resultEnum.getCode();
    }
    public MtzException(Integer code, String message) {
        super(message);
        this.code = code;
    }
}
